package cn.com.wdjedu.androidapp.wjeduandroid.ui.videoshow.adpter;

import android.content.Context;

import com.zhy.adapter.abslistview.CommonAdapter;
import com.zhy.adapter.abslistview.ViewHolder;

import java.util.List;

import cn.com.wdjedu.androidapp.wjeduandroid.R;
import cn.com.wdjedu.androidapp.wjeduandroid.ui.videoshow.bean.CommentBean;

/**
 * Created by CCY on 2017/2/17.
 */
/**
 * 评论适配器**/
public class CommentFragmentAdapter extends CommonAdapter<CommentBean> {

    public CommentFragmentAdapter(Context context, int layoutId, List<CommentBean> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convert(ViewHolder viewHolder, CommentBean item, int position) {
        viewHolder.setText(R.id.item_comment_userName,item.getUserName());
        viewHolder.setText(R.id.item_comment_likes,String.valueOf(item.getLikes()));
        viewHolder.setText(R.id.item_comment_time,item.getTime());
        viewHolder.setText(R.id.item_comment_content,item.getComment());
    }

}
